# FAST_BUILD_FILES(<NAME> <SRC_DIR> <BIN_DIR> FILE1 [FILE2 [FILE3 ..]])
FUNCTION(FAST_BUILD_FILES NAME SRC_DIR BIN_DIR)
SET(ALL_SRC ${ARGV})
LIST(REMOVE_AT ALL_SRC 2 1 0)
SET(DST ${BIN_DIR}/${NAME})
FILE(WRITE ${DST} "")
FOREACH(SRC_FILE ${ALL_SRC})
    FILE(APPEND ${DST} "#include \"${SRC_DIR}/${SRC_FILE}\"\n")
ENDFOREACH()
ENDFUNCTION()

# FAST_BUILD_DIRS(<NAME> <SRC_DIR> <BIN_DIR> DIR1 [DIR2 [DIR3..]])
FUNCTION(FAST_BUILD_DIRS NAME SRC_DIR BIN_DIR)
SET(DIRS ${ARGV})
LIST(REMOVE_AT DIRS 2 1 0)
FOREACH(DIR ${DIRS})
    AUX_SOURCE_DIRECTORY(${DIR} ALL_SRC)
ENDFOREACH()
FAST_BUILD_FILES(${NAME} ${SRC_DIR} ${BIN_DIR} ${ALL_SRC})
ENDFUNCTION()

